<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1 , user-scalable=no">
<title>图片分享社区后台</title>
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/CSS/bootstrap.css" />
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/CSS/bootstrap-maizi.css" />
</head>
<body>
	<!--导航-->
	<nav class="navbar navbar-default">
		<div class="container">
			<!--小屏幕导航按钮和logo-->
			<div class="navbar-header">
				<button class="navbar-toggle" data-toggle="collapse"
					data-target=".navbar-collapse">
					<span class="icon-bar"></span> <span class="icon-bar"></span> <span
						class="icon-bar"></span>
				</button>
				<a href="head.action" class="navbar-brand">图片分享社区后台</a>
			</div>
			<!--小屏幕导航按钮和logo-->
			<!--导航-->
			<div class="navbar-collapse collapse">
				<ul class="nav navbar-nav">
					<li><a href="head.action"><span
							class="glyphicon glyphicon-home"></span>&nbsp;&nbsp;后台首页</a>
					</li>
					<li><a href="usermanger.action"><span
							class="glyphicon glyphicon-user"></span>&nbsp;&nbsp;用户管理</a>
					</li>
					<li class="active"><a href="contentmanger.action"><span
							class="glyphicon glyphicon-list-alt"></span>&nbsp;&nbsp;内容管理</a>
					</li>
					<li><a href="labelmanger.action"><span
							class="glyphicon glyphicon-tags"></span>&nbsp;&nbsp;标签管理</a>
					</li>
				</ul>
				<ul class="nav navbar-nav navbar-right">
					<li class="dropdown"><a id="dLabel" type="button"
						data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
							<s:property value="#session.USER_NAME" /> <span class="caret"></span>
					</a>
						<ul class="dropdown-menu" aria-labelledby="dLabel">
							<li><a href="<%=basePath%>"><span
									class="glyphicon glyphicon-screenshot"></span>&nbsp;&nbsp;前台首页</a>
							</li>

							<li><a
								href="personsetting.action?id=<s:property value="#session.USER_ID"/>"><span
									class="glyphicon glyphicon-cog"></span>&nbsp;&nbsp;个人设置</a>
							</li>
						</ul></li>
					<li><a href="logout.action"><span
							class="glyphicon glyphicon-off"></span>&nbsp;&nbsp;退出</a>
					</li>
				</ul>
			</div>
			<!--导航-->

		</div>
	</nav>
	<!--导航-->

	<div class="container">
		<div class="row">
			<div class="col-md-2">
				<div class="list-group">
					<a href="contentmanger.action" class="list-group-item ">内容管理</a> <a
						href="noticemanger.action" class="list-group-item">公告管理</a> <a
						href="noticepublic.action" class="list-group-item active">发布公告</a>
				</div>
			</div>
			<div class="col-md-10">
				<div class="page-header">
					<h1>内容管理</h1>
				</div>
				<ul class="nav nav-tabs">
					<li><a href="contentmanger.action">内容管理</a></li>
					<li><a href="noticemanger.action">公告管理</a></li>
					<li class="active"><a href="noticepublic.action">发布公告</a></li>
				</ul>
				<form onsubmit="return check()"
					action="insertnotice.action?id=<s:property value='#session.USER_ID'/>"
					class="mar_t15" method="post">
					<div class="form-group">
						<label for="title">标题</label> <input type="text" id="title"
							class="form-control" name="notice.title" placeholder="请输入公告标题">
					</div>
					<div class="form-group">
						<label for="content">公告内容</label>
						<textarea id="content" name="notice.content" class="form-control"
							rows="15" cols="10" placeholder="请输入公告正文部分" required="required"></textarea>
					</div>


					<button type="submit" class="btn btn-default pull-right">发布公告</button>

				</form>

			</div>
		</div>
	</div>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel" style="text-align:center;">操作提示</h4>
      </div>
      <div class="modal-body">
                     <h5 style="text-align:center;">请填写完整表单！！</h5>
      </div>
      <div class="modal-footer">
    
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
      </div>
    </div>
  </div>
</div>
	<!--footer-->
	<footer>
		<div class="container">
			<div class="row">
				<div class="col-md-12">
					<p>
						Copyright&nbsp;©&nbsp;2012-2015&nbsp;&nbsp;www.sharephoto.com&nbsp;&nbsp;粤ICP备13014270号-4
					</p>
				</div>
			</div>
		</div>
	</footer>
	<!--footer-->


	<script
		src="${pageContext.request.contextPath}/JS/jquery-1.12.3.min.js"></script>
	<script src="${pageContext.request.contextPath}/JS/bootstrap.min.js"></script>
	<script type="text/javascript">
    function check(){
   if($("#title").val().trim()==""||$("#content").val().trim==""){
   $("#myModal").modal("show");
   return false;
   }else{
  return true; 
  }
 
   
  };
</script>
</body>
</html>